package com.cms.setting.basicset.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.setting.basicset.dao.BasicsetDAO;
import com.cms.setting.basicset.pojo.Basicset;
import com.cms.setting.basicset.service.BasicsetService;
@Service
public class BasicsetServiceImpl implements BasicsetService {
	@Autowired
	BasicsetDAO basicsetDAO;
	@Override
	public boolean saveBasicset(Basicset basicset) {
		if(basicset.getId()==null){
			return basicsetDAO.insert(basicset)>0;
		}else{
			return basicsetDAO.updateByPrimaryKeySelective(basicset)>0;
		}
	}

	@Override
	public Basicset findByCatId(Integer catId) {
		return basicsetDAO.selectByPrimaryKey(catId);
	}

}
